package com.ndp.fb.model.fbagent.param;

import com.ndp.fb.constant.ConfigConst;

import java.io.Serializable;

/**
 * Created by infi on 2015/1/21.
 */
public class ApiCallBackTarget implements Serializable {
    private static final String split = "$$$$$$";

    /**
     * @param moduleName
     * @param operation
     * @return
     */
    private static String getTargetType(String moduleName, String operation) {
        return moduleName + ApiCallBackTarget.split + operation;
    }

    /**
     * 需要一种优雅的方式获取
     *
     * @param type
     * @return
     */
    public static Target getTargetType(String type) {
        if (type != null && type.contains(ApiCallBackTarget.split)) {

            //广告发布
            AdPublish[] adPublishs = AdPublish.values();
            for (AdPublish adPublish : adPublishs) {
                if (adPublish.getTargetType().equals(type)) {
                    return adPublish;
                }
            }
            
            SyncBusiness[] syncBusinesses = SyncBusiness.values();
            for (SyncBusiness syncBusiness : syncBusinesses) {
                if (syncBusiness.getTargetType().equals(type)) {
                    return syncBusiness;
                }
            }
            PublishResource[] publishResources = PublishResource.values();
            for (PublishResource publishResource : publishResources) {
                if (publishResource.getTargetType().equals(type)) {
                    return publishResource;
                }
            }
            //自动控制
            AutoControl[] autoControls = AutoControl.values();
            for (AutoControl autoControl : autoControls) {
                if (autoControl.getTargetType().equals(type)) {
                    return autoControl;
                }
            }
            //自定义受众
            CustomAudience[] customAudiences = CustomAudience.values();
            for (CustomAudience customAudience : customAudiences) {
                if (customAudience.getTargetType().equals(type)) {
                    return customAudience;
                }
            }

            //feed  产品目录
            Product[] products = Product.values();
            for (Product product : products) {
                if (product.getTargetType().equals(type)) {
                    return product;
                }
            }

            //账户变更
            AssetsAlert[] assetsAlerts = AssetsAlert.values();
            for(AssetsAlert assetsAlert : assetsAlerts){
                if(assetsAlert.getTargetType().equals(type)){
                    return assetsAlert;
                }
            }

            //业务
            Business[] businesses = Business.values();
            for (Business business : businesses) {
                if (business.getTargetType().equals(type)) {
                    return business;
                }
            }

            //Insights异步Job
            InsightsAsyncJob[] insightsAsyncJobs = InsightsAsyncJob.values();
            for (InsightsAsyncJob insightsAsyncJob : insightsAsyncJobs) {
                if (insightsAsyncJob.getTargetType().equals(type)) {
                    return insightsAsyncJob;
                }
            }

            //统计数据
            Statitics[] statiticses = Statitics.values();
            for (Statitics stats : statiticses) {
                if (stats.getTargetType().equals(type)) {
                    return stats;
                }
            }

            //消息中心
            MessageCenter[] messageCenters = MessageCenter.values();
            for (MessageCenter messageCenter : messageCenters) {
                if (messageCenter.getTargetType().equals(type)) {
                    return messageCenter;
                }
            }

            //webpush
            WebPush[] webPushs = WebPush.values();
            for (WebPush webPush : webPushs) {
                if (webPush.getTargetType().equals(type)) {
                    return webPush;
                }
            }
            Robot[] robots = Robot.values();
            for (Robot robot : robots) {
                if (robot.getTargetType().equals(type)) {
                    return robot;
                }
            }
        }
        return null;
    }


    /**
     * 广告发布
     */
    public enum AdPublish implements Target {
        //用户定位
        TargetingSpec {
            private String operation = "TargetingSpec";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        //用户定位
        SimpleTargetingSpec {
            private String operation = "SimpleTargetingSpec";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        //用户定位
        TargetingSpecUsers {
            private String operation = "TargetingSpecUsers";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        //刷新
        RefreshAudienceUser {
            private String operation = "RefreshAudienceUser";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        //开始创建创意
        PreAdCreative {
            private String operation = "PreAdCreative";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        //外链广告创意
        OutlinkAdCreative {
            private String operation = "OutlinkAdCreative";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        OutlinkAdGroup {
            private String operation = "OutlinkAdGroup";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        AdCreative {
            private String operation = "AdCreative";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        //重试创建营销活动
        PreAdCampaignGroup {
            private String operation = "PreAdCampaignGroup";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        //重试创建广告组
        PreAdSet {
            private String operation = "PreAdSet";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        //重试创建广告
        PreAdGroup {
            private String operation = "PreAdGroup";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        //第三方图片广告审核
        AuditAd {
            private String operation = "AuditAd";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        AuditAdFix {
            private String operation = "AuditAdFix";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        AutoAdCampaign{
            private String operation = "AutoAdCampaign";
            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        AutoAdSet{
            private String operation = "AutoAdSet";
            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        AutoAdCreative{
            private String operation = "AutoAdCreative";
            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
       AutoAdGroup{
           private String operation = "AutoAdGroup";
           @Override
           public String getTargetType() {
               return moduleName + ApiCallBackTarget.split + operation;
           }
           @Override
           public String getModuleName() {
               return moduleName;
           }
       },
        AdCampaignGroup {
            private String operation = "AdCampaignGroup";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        AdSet {
            private String operation = "AdSet";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        AdGroup {
            private String operation = "AdGroup";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        };


        private static String moduleName = ConfigConst.MQ_SERVICES_ADPUBLISH_TOPIC;
    }

    /**
     * 业务数据同步
     */
    public enum SyncBusiness implements Target {

       
        /**
         * 更新 adGroup
         */
        UpdateAdGroup {
            private String operation = "UpdateAdGroup";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        /**
         * 更新 adSet
         */
        UpdateAdSet {
            private String operation = "UpdateAdSet";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        /**
         * 同步 adGroup
         */
        SyncAdGroupV2_4 {
            private String operation = "SyncAdGroupV2_4";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        /**
         * 同步 广告账号下的修改日志
         */
        SyncAdAccountActivities {
            private String operation = "SyncAdAccountActivities";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        /**
         * 同步用户的权限
         */
        SyncAdAccountPermissions {
            private String operation = "SyncAdAccountPermissions";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        /**
         * 同步广告账号下的应用和主页信息
         */
        SyncAdAccountApp {
            private String operation = "SyncAdAccountApp";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        };
        private static String moduleName = ConfigConst.MQ_SERVICES_SYNBUESINESS_TOPIC;
    }
    /**
     * 创建广告资源的目标枚举
     * @Title: ApiCallBackTarget.java
     * @Copyright: Copyright © 2015
     * @Description: 
     * @Company: yeahmobi
     * @Created on 下午5:08:54
     * @author giser.yang
     */
    public enum PublishResource implements Target {

        /**
         * 查找一个 adGroup,暂时放到这 以后整理的时候挪到正确的位置
         */
        FetchOneAdGroup {
            private String operation = "FetchOneAdGroup";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        /**
         * 获取视频的缩略图
         */
        FetchAdVideoThumbnail {
            private String operation = "FetchAdVideoThumbnail";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },

        /**
         * 同步图片
         */

        FetchAdImage {
            private String operation = "FetchAdImage";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + "FetchAdImage";
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },

        /**
         * 上传图片
         */
        SyncAdImage {
            private String operation = "SyncAdImage";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        /**
         * 上传图片
         */
        GetImageHash {
            private String operation = "GetImageHash";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        /**
         * 同步视频
         */
        SyncAdVideo {
            private String operation = "SyncAdVideo";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },

        /**
         * 发起视频上传
         */
        StartUploadAdVideo {
            private String operation = "StartUploadAdVideo";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        /**
         * 进行视频上传
         */
        TransferUploadAdVideo {
            private String operation = "TransferUploadAdVideo";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        /**
         * 结束视频上传
         */
        FinishUploadAdVideo {
            private String operation = "FinishUploadAdVideo";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        /**
         * 同步视频
         */
        SyncPage {
            private String operation = "SyncPage";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        };
        private static String moduleName = ConfigConst.MQ_SERVICES_PUBLISH_RESOURCE_TOPIC;
    }
    /**
     * 创建Insights异步Job
     */
    public enum InsightsAsyncJob implements Target {
        CreateInsightsAdGroupAsyncJob {
            private String operation = "createInsightsAdGroupAsyncJob";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        }, GetInsightsAdGroupAsyncJobStatus {
            private String operation = "getInsightsAdGroupAsyncJobStatus";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        GetInsightsAdGroupAsyncJobData {
            private String operation = "getInsightsAdGroupAsyncJobData";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        };
        private static String moduleName = ConfigConst.MQ_SERVICES_STATITICS_TOPIC;
    }

    /**
     * 拉取统计数据
     */
    public enum Statitics implements Target {
        StatsFbActionRecord {
            private String operation = "fbActionRecordStats";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        }, StatsLocalActionRecord {
            private String operation = "localActionRecordStats";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        StatsLocalActionByFieldsRecord {
            private String operation = "localActionByFieldsRecordStats";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        };
        private static String moduleName = ConfigConst.MQ_SERVICES_STATITICS_TOPIC;
    }

    /**
     * 自定义受众
     */
    public enum CustomAudience implements Target {
        AccountAgree {
            private String operation = "AccountAgree";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        AddCustomaudience {
            private String operation = "AddCustomaudience";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        AddCustomaudienceSecond {
            private String operation = "AddCustomaudienceSecond";
            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        UpdateCustomAudienceUsers {
            private String operation = "UpdateCustomAudienceUsers";
            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        AddCustomaudienceLookALike{
            private String operation = "AddCustomaudienceLookALike";
            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        UpdateCustomaudience {
            private String operation = "UpdateCustomaudience";
            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        UpdateCustomaudienceName {
            private String operation = "UpdateCustomaudienceName";
            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        Customaudiences {
            private String operation = "customaudiences";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + "customaudiences";
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        };
        private static String moduleName = ConfigConst.MQ_SERVICES_CUSTOM_AUDIENCE_TOPIC;
    }

    /**
     * 产品管理  feed product_catalog用的topic
     */
    public enum Product implements Target {
        AddCatalog {
            private String operation = "AddCatalog";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        BindCatalogPixel {
            private String operation = "BindCatalogPixel";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        CatalogCheck {
            private String operation = "CatalogCheck";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        AddFeed {
            private String operation = "AddFeed";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        UpdateFeed{
            private String operation = "UpdateFeed";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        UpdateFeedStatus{
            private String operation = "UpdateFeedStatus";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        CreateProductSet {
            private String operation = "CreateProductSet";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        UpdateProductSet {
            private String operation = "UpdateProductSet";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        };
        private static String moduleName = ConfigConst.MQ_SERVICES_PRODUCT_TOPIC;
    }

    /**
     * adGroup
     */
    public enum Business implements Target {
        //
        ReviewAdGroup {
            private String operation = "Review";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + "review";
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        }, UpdateAdGroupStatus {
            private String operation = "UpdateAdGroupStatus";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + "UpdateAdGroupStatus";
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        }, UpdateASet {
            private String operation = "UpdateASet";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + "UpdateASet";
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        DeleteAdGroupByBoss {
            private String operation = "DeleteByBoss";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        GcAdGroupByBoss {
            private String operation = "GcByBoss";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        GcAdGroupCallback {
            private String operation = "GcByBossCallback";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        };

        private static String moduleName = ConfigConst.MQ_SERVICES_BUESINESS_TOPIC;
    }

    /**
     * 自动控制
     */
    public enum AutoControl implements Target {
        GetAdSetsStats {
            private String operation = "GetAdSetsStats";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }


        },
        GetGroupsStats {
            private String operation = "GetGroupsStats";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }


        },
        GetOneGroupsStats {
            private String operation = "GetOneGroupsStats";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }


        },
        /**
         * 同步广告账号下的ins账号
         */
        SyncIns {
            private String operation = "SyncIns";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        UpdateAdSetBudget {
            private String operation = "UpdateAdSetBudget";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        AdGroupDelete {
            private String operation = "AdGroupDelete";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        AdGroupPause {
            private String operation = "AdGroupPause";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }

        },
        AdGroupActive {
            private String operation = "AdGroupActive";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }


        },;
        private static String moduleName = ConfigConst.MQ_SERVICES_AUTOCONTROLL_TOPIC;

    }

    public enum MessageCenter implements Target {
        EventNotificationMessage {
            private String operation = "EventNotificationMessage";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
    	EventNotificationMonitorMessage {
            private String operation = "EventNotificationMonitorMessage";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        };
        private static String moduleName = ConfigConst.MQ_SERVICES_MESSAGE_CENTER_TOPIC;
    }

    public enum WebPush implements Target {
        WebSocketPushNotification {
            private String operation = "WebSocketPushNotification";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        RoleMenuCacheCleanNotification {
            private String operation = "RoleMenuCacheCleanNotification";
            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {
                return moduleName;
            }
        };
        private static String moduleName = ConfigConst.MQ_SERVICES_WEB_PUSH_TOPIC;
    }

    public enum AssetsAlert implements Target{
        //账号变更
        AccountAlert{
            private String operation = "accountAlert";
            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }
            @Override
            public String getModuleName() {return moduleName;}
        },
        //主页变更
        PageAlert{
            private String operation = "pageAlert";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        //应用变更
        AppAlert{
            private String  operation = "appAlert";
            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        };
        private static String moduleName = ConfigConst.MQ_SERVICES_ACCOUNTALTER_TOPIC;
    }

    /**
     *  自动创建
     */
    public enum Robot implements Target {
        //修改预算
        UpdateBudget {
            private String operation = "updateBudget";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        },
        //关停广告
        StopAd {
            private String operation = "stopAd";

            @Override
            public String getTargetType() {
                return moduleName + ApiCallBackTarget.split + operation;
            }

            @Override
            public String getModuleName() {
                return moduleName;
            }
        };
        private static String moduleName = ConfigConst.MQ_SERVICES_ROBOT_TOPIC;
    }


    public interface Target extends Serializable {

        /**
         * 返回值为模块名称$$$$$$加操作
         *
         * @return
         */
        public String getTargetType();

        /**
         * 获取模块名称
         *
         * @return
         */
        public String getModuleName();

    }
}
